<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>EasyIO-GPRS-Framework: api.h源文件</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javaScript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- 制作者 Doxygen 1.7.1 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
--></script>
<div class="navigation" id="top">
  <div class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>首页</span></a></li>
      <li><a href="annotated.html"><span>类</span></a></li>
      <li class="current"><a href="files.html"><span>文件</span></a></li>
      <li id="searchli">
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="搜索" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>文件列表</span></a></li>
      <li><a href="globals.html"><span>文件成员</span></a></li>
    </ul>
  </div>
<div class="header">
  <div class="headertitle">
<h1>api.h</h1>  </div>
</div>
<div class="contents">
<a href="api_8h.html">浏览该文件的文档。</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 ﻿
<a name="l00015"></a>00015 <span class="preprocessor">#ifndef __easy_io_api_h__</span>
<a name="l00016"></a>00016 <span class="preprocessor"></span><span class="preprocessor">#define __easy_io_api_h__</span>
<a name="l00017"></a>00017 <span class="preprocessor"></span>
<a name="l00018"></a>00018 <span class="preprocessor">#include &quot;<a class="code" href="api__type_8h.html" title="结构体类型">api_type.h</a>&quot;</span>
<a name="l00019"></a>00019 <span class="preprocessor">#include &quot;<a class="code" href="api__result_8h.html" title="API函数返回值描述.">api_result.h</a>&quot;</span>
<a name="l00020"></a>00020 <span class="preprocessor">#include &quot;<a class="code" href="init_8h.html" title="初始化相关文件">init.h</a>&quot;</span>
<a name="l00021"></a>00021 
<a name="l00022"></a>00022 
<a name="l00023"></a><a class="code" href="api_8h.html#afabb8cdc9450ec537c0bee641a9fda90">00023</a> <span class="preprocessor">#define EI_MALLOC rt_malloc             </span>
<a name="l00024"></a><a class="code" href="api_8h.html#a0044eb38af0014e6521a14a72d05a2f5">00024</a> <span class="preprocessor">#define EI_FREE rt_free                 </span>
<a name="l00025"></a><a class="code" href="api_8h.html#a99e9891b3f22938094c443a813bbf12d">00025</a> <span class="preprocessor">#define EI_SLEEP rt_thread_sleep        </span>
<a name="l00026"></a><a class="code" href="api_8h.html#a2a9524bec0f80b9e02d3c2b5606a85a6">00026</a> <span class="preprocessor">#define EI_DEBUG rt_kprintf             </span>
<a name="l00029"></a><a class="code" href="structeasyio__api.html">00029</a> <span class="preprocessor">typedef struct easyio_api {</span>
<a name="l00030"></a>00030 <span class="preprocessor"></span>
<a name="l00037"></a><a class="code" href="structeasyio__api.html#a43be80ce5ebd638efe4b6af8e358686f">00037</a>         int (*SerialPrintf)(USART_PORT_NUM port , <span class="keywordtype">char</span> *fmt, ...);
<a name="l00045"></a><a class="code" href="structeasyio__api.html#a1298934569b7e9b86cee12ff6cfd00de">00045</a>         EIResult_t (*WriteSerial)(USART_PORT_NUM port , <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *buffer , <span class="keywordtype">int</span> size);
<a name="l00046"></a>00046 
<a name="l00047"></a>00047 
<a name="l00056"></a><a class="code" href="structeasyio__api.html#a7274351a1e90fd37a14cd54ac422f3b0">00056</a>         EIResult_t (*ReadEEPROM)(<span class="keywordtype">int</span> pos , <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *buffer , <span class="keywordtype">int</span> size);
<a name="l00057"></a>00057 
<a name="l00066"></a><a class="code" href="structeasyio__api.html#a74371fc16142695ab3b29d05fe425312">00066</a>         EIResult_t (*WriteEEPROM)(<span class="keywordtype">int</span> pos , <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *buffer , <span class="keywordtype">int</span> size);
<a name="l00067"></a>00067 
<a name="l00072"></a><a class="code" href="structeasyio__api.html#af3e6a306a1a65ded6d5ca09cf3edab15">00072</a>         EIResult_t (*GetGsmLoc)(<span class="keyword">struct </span><a class="code" href="structGsmLocInfo.html">GsmLocInfo</a> *info);
<a name="l00073"></a>00073 
<a name="l00081"></a><a class="code" href="structeasyio__api.html#ad40530d74061e02d17ebbf8226c38693">00081</a>         EIResult_t (*SendSms)(<span class="keyword">const</span> <span class="keywordtype">char</span> *phonenum ,<span class="keyword">const</span> <span class="keywordtype">char</span> *body);
<a name="l00082"></a>00082 
<a name="l00090"></a><a class="code" href="structeasyio__api.html#acc85d91094267019c995d422f7374b5c">00090</a>         EIResult_t (*SendTcpData)(<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *buffer , <span class="keywordtype">int</span> size);
<a name="l00091"></a>00091 
<a name="l00099"></a><a class="code" href="structeasyio__api.html#a687bd71e660b5262e599b0dcbba125e4">00099</a>         EIResult_t (*SendP2paMsg)(<span class="keyword">const</span> <span class="keywordtype">char</span> *imei , <span class="keyword">const</span> <span class="keywordtype">char</span> *body);
<a name="l00100"></a>00100 
<a name="l00108"></a><a class="code" href="structeasyio__api.html#a10bd83b74e7674cf1b41c1c835f67e18">00108</a>         EIResult_t (*SendXmppMsg)(<span class="keyword">const</span> <span class="keywordtype">char</span> * to , <span class="keyword">const</span> <span class="keywordtype">char</span> *body);
<a name="l00109"></a>00109 
<a name="l00118"></a><a class="code" href="structeasyio__api.html#a4aed707d19689eaf460d796e533dc7a5">00118</a>         int (*HttpRequest)(<span class="keyword">const</span> <span class="keywordtype">char</span> *url, <span class="keyword">const</span> <span class="keywordtype">char</span> *UserHeader ,<span class="keywordtype">char</span> *RespBuffer , <span class="keywordtype">int</span> RespBufSize);
<a name="l00119"></a>00119 
<a name="l00120"></a>00120         
<a name="l00125"></a><a class="code" href="structeasyio__api.html#ac4641b9f122776bf385aa367442e5117">00125</a>         int (*SignalValue)();
<a name="l00126"></a>00126 
<a name="l00132"></a><a class="code" href="structeasyio__api.html#a9abdfb8954c0614631aba81b3ca803ea">00132</a>         EIResult_t (*GetSysInfo)(<span class="keyword">struct </span><a class="code" href="structSysInfo.html">SysInfo</a> *info);
<a name="l00133"></a>00133 
<a name="l00141"></a><a class="code" href="structeasyio__api.html#ab380e2959518653845121398cdae8dd9">00141</a>         <span class="keywordtype">unsigned</span> int (*CreateThread)(<span class="keywordtype">int</span> StackSize , <span class="keywordtype">void</span> *ThreadEntry , <span class="keywordtype">void</span> *ThreadParam);
<a name="l00142"></a>00142 
<a name="l00149"></a><a class="code" href="structeasyio__api.html#acba344fcea0062f45e37d375fee5965d">00149</a>         EIResult_t (*AddTask)(<span class="keywordtype">void</span> *TaskEntry , <span class="keywordtype">void</span> *TaskParam);
<a name="l00150"></a>00150 
<a name="l00155"></a><a class="code" href="structeasyio__api.html#a165c7f839018626220040c9d6ec073f3">00155</a>         void (*Sleep)(<span class="keywordtype">int</span> tick);
<a name="l00156"></a>00156 
<a name="l00161"></a><a class="code" href="structeasyio__api.html#ab2d14bcff1a407065504adfa7847cb87">00161</a>         void (*DelayUS)(<span class="keywordtype">int</span> us);
<a name="l00162"></a>00162 
<a name="l00167"></a><a class="code" href="structeasyio__api.html#a87b0fc130fd913a428e779b09549984d">00167</a>         void (*EnableWatchDog)();
<a name="l00172"></a><a class="code" href="structeasyio__api.html#a0bf72d0606b8256b399516c5db275c2e">00172</a>         void (*ResetSystem)();
<a name="l00173"></a>00173 
<a name="l00178"></a><a class="code" href="structeasyio__api.html#a5baf2731b1fc36b8cf995d14333a682a">00178</a>         void (*ResetGprsMoudle)();
<a name="l00179"></a>00179 
<a name="l00184"></a><a class="code" href="structeasyio__api.html#a018117a6eafcfe6ff30dd0b3b48f93e9">00184</a>         void (*SetSysDebugMask)(<span class="keywordtype">int</span> mask);
<a name="l00185"></a>00185 
<a name="l00191"></a><a class="code" href="structeasyio__api.html#ac110b5ee4272d5b0228be46207784335">00191</a>         void (*SetRecvSmsHook)(<span class="keyword">struct </span><a class="code" href="structeasyio__api.html">easyio_api</a> *api,void (*func)(<span class="keywordtype">char</span> *phonenum , <span class="keywordtype">char</span> *str));
<a name="l00192"></a>00192 
<a name="l00198"></a><a class="code" href="structeasyio__api.html#ad93cca0151c9b9f937c7bec2bf85d7f7">00198</a>         void (*<a class="code" href="structeasyio__api.html#ad93cca0151c9b9f937c7bec2bf85d7f7">SetRecvWechatHook</a>)(<span class="keyword">struct </span><a class="code" href="structeasyio__api.html">easyio_api</a> *api,void (*func)(<span class="keywordtype">char</span> *from , <span class="keywordtype">char</span> *msg , EIResult_t(*relpy)(<span class="keywordtype">char</span> *msg)));
<a name="l00199"></a>00199 
<a name="l00205"></a><a class="code" href="structeasyio__api.html#a644fdef9503b073e0afa29b52d94b932">00205</a>         void (*<a class="code" href="structeasyio__api.html#a644fdef9503b073e0afa29b52d94b932">SetRecvTcpcliDataHook</a>)(<span class="keyword">struct </span><a class="code" href="structeasyio__api.html">easyio_api</a> *api,void (*func)(<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> * buffer , <span class="keywordtype">int</span> size));
<a name="l00206"></a>00206 
<a name="l00212"></a><a class="code" href="structeasyio__api.html#ae3c9dbc52f62284189c1e4c25eebdedf">00212</a>         void (*<a class="code" href="structeasyio__api.html#ae3c9dbc52f62284189c1e4c25eebdedf">SetRecvSerialDataHook</a>)(<span class="keyword">struct </span><a class="code" href="structeasyio__api.html">easyio_api</a> *api,void (*func)(USART_PORT_NUM port , <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> * buffer , <span class="keywordtype">int</span> size));
<a name="l00213"></a>00213 
<a name="l00219"></a><a class="code" href="structeasyio__api.html#a8068c5f078a50b0bc8551b5c6cf9b430">00219</a>         void (*<a class="code" href="structeasyio__api.html#a8068c5f078a50b0bc8551b5c6cf9b430">SetRecvDebugDataHook</a>)(<span class="keyword">struct </span><a class="code" href="structeasyio__api.html">easyio_api</a> *api,void (*func)(<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> * buffer , <span class="keywordtype">int</span> size));
<a name="l00220"></a>00220 
<a name="l00221"></a>00221 
<a name="l00222"></a>00222 
<a name="l00223"></a>00223 
<a name="l00230"></a><a class="code" href="structeasyio__api.html#a3ef076065163de890e981162e27f6ff8">00230</a>         void (*<a class="code" href="structeasyio__api.html#a3ef076065163de890e981162e27f6ff8">RecvSmsFunc</a>)(<span class="keywordtype">char</span> *from , <span class="keywordtype">char</span> *body);
<a name="l00231"></a>00231 
<a name="l00239"></a><a class="code" href="structeasyio__api.html#a4fad4f5f6389e0fa43ec11a4eca4fb78">00239</a>         void (*<a class="code" href="structeasyio__api.html#a4fad4f5f6389e0fa43ec11a4eca4fb78">RecvWechatFunc</a>)(<span class="keywordtype">char</span> *from , <span class="keywordtype">char</span> *body , EIResult_t(*relpy)(<span class="keywordtype">char</span> *msg));
<a name="l00240"></a>00240 
<a name="l00247"></a><a class="code" href="structeasyio__api.html#ac0882bcaab788dd8a9f1dfe1335b0d50">00247</a>         void (*<a class="code" href="structeasyio__api.html#ac0882bcaab788dd8a9f1dfe1335b0d50">RecvTcpDataFunc</a>)(<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *buffer , <span class="keywordtype">int</span> size);
<a name="l00248"></a>00248 
<a name="l00255"></a><a class="code" href="structeasyio__api.html#a89edcc1e11ff1453b4798eb5222b1639">00255</a>         void (*<a class="code" href="structeasyio__api.html#a89edcc1e11ff1453b4798eb5222b1639">RecvSerialDataFunc</a>)(USART_PORT_NUM port , <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *buffer , <span class="keywordtype">int</span> size);
<a name="l00256"></a>00256 
<a name="l00257"></a>00257 }<a class="code" href="structeasyio__api.html">EASYIO_API</a>;
<a name="l00258"></a>00258 
<a name="l00259"></a>00259 <span class="keyword">extern</span> <a class="code" href="structeasyio__api.html">EASYIO_API</a> api;
<a name="l00260"></a>00260 
<a name="l00261"></a>00261 
<a name="l00266"></a>00266 <span class="keywordtype">void</span> <a class="code" href="api_8h.html#af6cd41759d0f0973557039899173ffce">Startup</a>(<span class="keywordtype">void</span>);
<a name="l00267"></a>00267 
<a name="l00268"></a>00268 
<a name="l00269"></a>00269 <span class="preprocessor">#endif</span>
</pre></div></div>
</div>
<!--- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&nbsp;</span>全部</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&nbsp;</span>类</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&nbsp;</span>文件</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&nbsp;</span>函数</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&nbsp;</span>变量</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&nbsp;</span>枚举</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&nbsp;</span>枚举值</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&nbsp;</span>宏定义</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<hr class="footer"/><address class="footer"><small>Generated at Fri Mar 28 2014 11:51:07 for EasyIO-GPRS-Framework by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.1 </small></address>
</body>
</html>
